package com.xiaoxing.zhinenghuacangku_zhijian.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.xiaoxing.zhinenghuacangku_zhijian.mvp.contract.JianCeYuanJianCeContract;
import com.xiaoxing.zhinenghuacangku_zhijian.mvp.model.JianCeYuanJianCeModel;


@Module
public class JianCeYuanJianCeModule {
    private JianCeYuanJianCeContract.View view;

    /**
     * 构建JianCeYuanJianCeModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public JianCeYuanJianCeModule(JianCeYuanJianCeContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    JianCeYuanJianCeContract.View provideJianCeYuanJianCeView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    JianCeYuanJianCeContract.Model provideJianCeYuanJianCeModel(JianCeYuanJianCeModel model) {
        return model;
    }
}